Method of and apparatus for generating a depth map utilized in autofocusing

ABSTRACT

A method of and an apparatus for determining a depth map utilizing a movable lens and an image sensor are described herein. The depth information is acquired by moving the lens a short distance and acquiring multiple images with different blur quantities. An improved method of simulating gaussian blur and an approximation equation that relates a known gaussian blur quantity to a known pillbox quantity are used in conjunction with a non-linear blur difference equation. The blur quantity difference is able to be calculated and then used to determine the depth map. Many applications are possible using the method and system described herein, such as autofocusing, surveillance, robot/computer vision, autonomous vehicle navigation, multi-dimensional imaging and data compression.

FIELD OF THE INVENTION

The present invention relates to the field of imaging. More specifically, the present invention relates to improved autofocusing.

BACKGROUND OF THE INVENTION

A variety of techniques for generating depth maps and autofocusing on objects have been implemented in the past. One method conventionally used in autofocusing devices, such as video cameras, is referred to a hill-climbing method. The method performs focusing by extracting a high-frequency component from a video signal obtained by an image sensing device such as a CCD and driving a taking lens such that the mountain-like characteristic curve of this high-frequency component is a maximum. In another method of autofocusing, the detected intensity of blur width (the width of an edge portion of the object) of a video signal is extracted by a differentiation circuit.

A wide range of optical distance finding apparatus and processes are known. Such apparatus and processes may be characterized as cameras which record distance information that are often referred to as depth maps of three-dimensional spatial scenes. Some conventional two-dimensional range finding cameras record the brightness of objects illuminated by incident or reflected light. The range finding cameras record images and analyze the brightness of the two-dimensional image to determine its distance from the camera. These cameras and methods have significant drawbacks as they require controlled lighting conditions and high light intensity discrimination.

Another method involves measuring the error in focus, the focal gradient, and employs the focal gradient to estimate the depth. Such a method is disclosed in the paper entitled “A New Sense for Depth Field” by Alex P. Pentland published in the Proceedings of the International Joint Conference on Artificial Intelligence, August, 1985 and revised and republished without substantive change in July 1987 in IEEE Transactions on Pattern Analysis and Machine Intelligence, Volume PAMI-9, No. 4. Pentland discusses a method of depth-map recovery which uses a single image of a scene, containing edges that are step discontinuities in the focused image. This method requires the knowledge of the location of these edges, and this method cannot be used if there are no perfect step edges in the scene.

Other methods of determining distance are based on computing the Fourier transforms of two or more recorded images and then computing the ratio of these two Fourier transforms. Computing the two-dimensional Fourier transforms of recorded images is computationally very expensive which involves complex and costly hardware.

Other methods have been implemented by comparing multiple images to determine a depth. One method includes using an image that is in-focus and an image that is out-of-focus where the in-focus value is zero, hence the mathematics are very simple. Another method utilizes two separate images, with different focuses, where the distance between the images is the blur of the first image minus the blur of the second image. Computations are performed to determine the depth, although there are significant drawbacks with the past methods implemented in these computations.

SUMMARY OF THE INVENTION

A method of and an apparatus for determining a depth map utilizing a movable lens and an image sensor are described herein. The depth information is acquired by moving the lens a short distance and acquiring multiple images with different blur quantities. An improved method of simulating gaussian blur and an approximation equation that relates a known gaussian blur quantity to a known pillbox quantity are used in conjunction with a non-linear blur difference equation. The blur quantity difference is able to be calculated and then used to determine the depth map. Many applications are possible using the method and system described herein, such as autofocusing, surveillance, robot/computer vision, autonomous vehicle navigation, multi-dimensional imaging and data compression.

In one aspect, an apparatus for determining depth information comprises a lens for acquiring an image signal, an image sensor for receiving the image signal, wherein one or more of the lens and the image sensor are movable in relation to each other and a processing module coupled to the image sensor for determining depth information by using a first blur quantity and a second blur quantity to determine a non-linear blur difference. The lens, the image sensor and the processing module are contained within an imaging device. The imaging device is selected from the group consisting of a camera, a video camera, a camcorder, a digital camera, a cell phone and a PDA. The lens is movable and acquires the image signal at a first position and then at a second position. The processing module simulates gaussian blur. The processing module simulates gaussian blur using iterations of a convolution kernel. The processing module relates a gaussian blur quantity to a pillbox blur quantity.

In another aspect, a method of determining depth information comprises receiving a first image signal with a first blur quantity at an image sensor after the first image signal passes through a lens at a first position, receiving a second image signal with a second blur quantity at the image sensor after the second image signal passes through the lens at a second position, computing a non-linear blur difference using the first blur quantity and the second blur quantity and generating a depth map from the non-linear blur difference. The method is performed within an imaging device. The imaging device is selected from the group consisting of a camera, a video camera, a camcorder, a digital camera, a cell phone and a PDA. The method further comprises simulating gaussian blur. Simulating gaussian blur uses iterations of a convolution kernel. The method further comprises relating a gaussian blur quantity to a pillbox blur quantity.

In another aspect, a method calculating depth information comprises simulating a gaussian blur quantity using a convolution kernel, relating the gaussian blur quantity to a pillbox blur quantity, computing a non-linear blur difference and generating a depth map from the non-linear blur difference. The method is performed within an imaging device. The imaging device is selected from the group consisting of a camera, a video camera, a camcorder, a digital camera, a cell phone and a PDA. Simulating gaussian blur uses iterations of a convolution kernel.

In yet another aspect, a capture and display device comprises a lens for receiving an image signal, an image sensor for receiving the received image signal, wherein one or more of the lens and the image sensor are movable in relation to each other and a program coupled to the image sensor for determining depth information by using a first blur quantity and a second blur quantity to determine a non-linear blur difference. The lens, the image sensor and the program are contained within an imaging device. The imaging device is selected from the group consisting of a camera, a video camera, a camcorder, a digital camera, a cell phone and a PDA. The lens is movable and acquires the image signal at a first position and then at a second position. The program simulates gaussian blur. The program simulates gaussian blur using iterations of a convolution kernel. The program relates a gaussian blur quantity to a pillbox blur quantity.

In another aspect, an apparatus for determining depth information comprises a lens for receiving an image signal, an image sensor for receiving the received image signal, wherein one or more of the lens and the image sensor are movable in relation to each other and a processing module coupled to the image sensor for determining depth information by using a first blur quantity and a second blur quantity to determine a non-linear blur difference, wherein a gaussian blur is simulated. The lens, the image sensor and the processing module are contained within an imaging device. The imaging device is selected from the group consisting of a camera, a video camera, a camcorder, a digital camera, a cell phone and a PDA. The image sensor is movable and acquires the image signal at a first position and then at a second position. The processing module simulates the gaussian blur using iterations of a convolution kernel. The processing module relates the gaussian blur quantity to a pillbox blur quantity.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an exemplary arrangement of a lens in a first position and in a second position to receive two images with different blur quantities on a sensor.

FIG. 2A illustrates an example of gaussian blur in continuous time.

FIG. 2B illustrates an example of gaussian blur in discrete time.

FIG. 2C illustrates an example of gaussian blur in discrete time.

FIG. 3 illustrates an exemplary arrangement of a lens and a sensor to receive two images with different blur quantities.

FIG. 4 illustrates two images with different blur quantities.

FIG. 5 illustrates two images with different blur quantities.

FIG. 6 illustrates a lens with designated lengths used for determining the blur quantity.

FIG. 7 illustrates a graphical representation of an imaging device.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

A method of and an apparatus for determining a depth map are described herein. The depth information is acquired by moving a lens a short distance and acquiring multiple pictures with different blur quantities or functions. A more accurate gaussian blur implementation, in addition to a non-linear version of the blur difference allow a better determination of the depth map. By telescoping between the two blurred functions using the gaussian blur implementation, a depth map is determined. In the ideal optical scenario, the two functions are pillbox blur functions.

FIG. 1 illustrates an example of a lens 100 in a first position and in a second position to generate two images with different blur quantities on a sensor 102. With the lens 100 in focus position A, the distance from a scene (not shown) to the lens 100 is the distance d₀ and the distance between the lens and the focal point is the distance d₁, where the distance d₀ is much greater than the distance d₁. The distance between the lens 100 and the sensor 102 is the distance D_(J). Furthermore, the blur radius with the lens 100 in focus position A is radius r₁. When the lens 100 is in focus position A+\delta, the distance from the scene (not shown) to the lens 100 is still the distance d₀, however the distance between the lens and the focal point is the distance d₂ where the distance d₀ is much greater than the distance d₂. The distance between the lens 100 and the sensor 102 is the distance D₄. Hence, the blur radius with the lens 100 in focus position A+\delta is the radius r₂. Once the different blur radii, r₁ and r₂, are known, depths of objects in the scene are able to be determined for use in a number of applications.

FIGS. 2A-C illustrate examples of gaussian blurs. In FIG. 2A, a well known result is shown in continuous time where σ₁=1 and σ₁ ²=1; σ₂=2 and σ₂ ²=4; σ₁+σ₂=√{square root over (5)} and σ₁ ²+σ₂ ²=5. Each section of equation (1), shown below, is shown in graph form in FIG. 2A. The section with σ₁ ² reaches a maximum of 0.3989, the section with σ₂ ² reaches 0.1995 and the section with σ₁ ²+σ₂ ² reaches 0.1784.

$\begin{matrix} {{\frac{1}{\sqrt{2\;{\pi\sigma}_{1}^{2}}}{\mathbb{e}}^{- {(\frac{x^{2}}{2\sigma_{1}^{2}})}}*\frac{1}{\sqrt{2\;{\pi\sigma}_{2}^{2}}}{\mathbb{e}}^{- {(\frac{x^{2}}{2\sigma_{2}^{2}})}}} = {\frac{1}{\sqrt{2\;{\pi\left( {\sigma_{1}^{2} + \sigma_{2}^{2}} \right)}}}{\mathbb{e}}^{- {(\frac{x^{2}}{2{({\sigma_{1}^{2} + \sigma_{2}^{2}})}})}}}} & (1) \end{matrix}$ FIG. 2B shows the gaussian blur calculated in discrete time using sampled data. The result is similar to that in FIG. 2A.

$\begin{matrix} {{\frac{1}{\sqrt{2\;{\pi\sigma}_{1}^{2}}}{\mathbb{e}}^{- {(\frac{x_{i}^{2}}{2\sigma_{1}^{2}})}}*\frac{1}{\sqrt{2\;{\pi\sigma}_{2}^{2}}}{\mathbb{e}}^{- {(\frac{x_{i}^{2}}{2\sigma_{2}^{2}})}}} = {\frac{1}{\sqrt{2\;{\pi\left( {\sigma_{1}^{2} + \sigma_{2}^{2}} \right)}}}{\mathbb{e}}^{- {(\frac{x_{i}^{2}}{2{({\sigma_{1}^{2} + \sigma_{2}^{2}})}})}}}} & (2) \end{matrix}$ FIG. 2C is also in discrete time using sampled data. However, the result is not same as in FIGS. 2A and 2B. The section of equation (3) with σ₁ ²+σ₂ ² does not reach 0.1784. Hence, there are issues with accuracy using this method.

$\begin{matrix} {\begin{matrix} {\frac{1}{\sqrt{2\;\pi\;\sigma_{1}^{2}}}{\mathbb{e}}^{- {(\frac{x_{k}^{2}}{2\sigma_{1}^{2}})}}*} \\ {\frac{1}{\sqrt{2\;\pi\;\sigma_{1}^{2}}}{\mathbb{e}}^{- {(\frac{x_{k}^{2}}{2\sigma_{2}^{2}})}}} \end{matrix} = {\frac{1}{\sqrt{2\;{\pi\left( {\sigma_{1}^{2} + \sigma_{2}^{2}} \right)}}}{\mathbb{e}}^{- {(\frac{x_{k}^{2}}{2{({\sigma_{1}^{2} + \sigma_{2}^{2}})}})}}}} & (3) \end{matrix}$

The accuracy of determining the gaussian blur is able to be improved by using the following method based on differential equations.

In one dimension: f: R→R L: R×R₊→R L(x;0)=f(x) g: R×R₊\{0}→R where f is the one dimensional signal and L is defined by L(x;0)=f(x) and convolution with g, the gaussian blur kernel. Then:

$\begin{matrix} {{{L\left( {x;t} \right)} = {\int_{- \infty}^{+ \infty}{\frac{1}{\sqrt{2\;\pi\; t}}{\mathbb{e}}^{\frac{\xi^{2}}{2t}}\ {f\left( {x - \xi} \right)}{\mathbb{d}\xi}}}},{t > 0}} & (4) \end{matrix}$ and is defined by the diffusion equation:

$\begin{matrix} {{\frac{\partial L}{\partial t} = {\frac{1}{2}\frac{\partial^{2}L}{\partial x^{2}}}},{{L\left( {x;0} \right)} = {f(x)}}} & (5) \end{matrix}$ Using Euler's method, the continuous equation:

$\begin{matrix} {\frac{\partial L}{\partial t} = {\frac{1}{2}\frac{\partial^{2}L}{\partial x^{2}}}} & (6) \end{matrix}$ can be discretized and rewritten in the following form:

$\begin{matrix} {{L_{i,{k + 1}} = {{\frac{\Delta\; t}{2}L_{{i + 1},k}} + {\left( {1 - {\Delta\; t}} \right)L_{i,k}} + {\frac{\Delta\; t}{2}L_{{i - 1},k}}}},{{\Delta\; t} \leq \frac{1}{2}}} & (7) \end{matrix}$ For example, if Δt=½, it is easy to realize the implementation above using the following convolution kernel: [¼ ½ ¼] Although the example where Δt=½ is used above and below for clarity, it should be understood that values for Δt less than ½ such as ¼ are able to be used as well in one dimension. For instance, if Δt=¼, then the kernel obtained is [⅛ ¾ ⅛]. By reducing the Δt value from ½ to ¼, the number of iterations needed to have the same effect increases. The equations below utilize the assumption that Δt=½ for one dimension. The Central Limit Theorem shows that the repeated iteration of the kernel quickly yields a gaussian function: [¼ ½ ¼]*[¼ ½ ¼]* . . . *[¼ ½ ¼] Equation (8) is the old, less accurate version of determining the blur.

$\begin{matrix} {\begin{matrix} {\frac{1}{\sqrt{2\;\pi\;\sigma_{start}^{2}}}{\mathbb{e}}^{- {(\frac{x_{m}^{2}}{2\sigma_{start}^{2}})}}*} \\ {\frac{1}{\sqrt{2\;\pi\;\sigma_{?}^{2}}}{\mathbb{e}}^{- {(\frac{x_{m}^{2}}{2\sigma_{?}^{2}})}}} \end{matrix} = {\frac{1}{\sqrt{2\;{\pi\sigma}_{finish}^{2}}}{\mathbb{e}}^{- {(\frac{x_{m}^{2}}{2\sigma_{finish}^{2}})}}}} & (8) \end{matrix}$ Equation (9) is an improved version. Using the number of iterations of [¼ ½ ¼] needed to be applied to telescope between and σ_(start) ² and σ_(finish) ², the σ_(?) ² is able to be calculated accurately.

$\begin{matrix} {{\frac{1}{\sqrt{2\;\pi\;\sigma_{start}^{2}}}{\mathbb{e}}^{- {(\frac{x_{m}^{2}}{2\sigma_{start}^{2}})}}*\left\lbrack {{1/4}\mspace{31mu}{1/2}\mspace{31mu}{1/4}} \right\rbrack*\ldots*\left\lbrack {{1/4}\mspace{31mu}{1/2}\mspace{31mu}{1/4}} \right\rbrack} = {\frac{1}{\sqrt{2\;{\pi\sigma}_{finish}^{2}}}{\mathbb{e}}^{- {(\frac{x_{m}^{2}}{2\sigma_{finish}^{2}})}}}} & (9) \end{matrix}$ Using a similar numerical analysis approach shown in the ID case, we obtain the following convolution kernel for the 2D case for Δt=¼. It should be understood that values for Δt less than ¼ such as ⅛ are able to be used as well in two dimensions. By reducing the Δt value from ¼ to ⅛, the number of iterations needed to have the same effect increases.

$\begin{matrix} \frac{1}{48} & \frac{1}{12} & \frac{1}{48} \\ \frac{1}{12} & \frac{7}{12} & \frac{1}{12} \\ \frac{1}{48} & \frac{1}{12} & \frac{1}{48} \end{matrix}$

Fast implementation of the convolution kernel is possible using vector shifts, multiplication and addition.

In one dimension for example: h=[¼ ½ ¼] data=[a1 a2 a3 a4 a5 a6 a7 a8 a9 a10] result=data*h, such that: result=¼*[a2 a3 a4 a5 a6 a7 a8 a9 a10 a1]+½*[a1 a2 a3 a4 a5 a6 a7 a8 a9 a10]+¼*[a10 a1 a2 a3 a4 a5 a6 a7 a8 a9] Furthermore, the one dimensional version is easily generalized to two dimensions. The following relationship exists for the one dimensional and two dimensional kernels:

One Dimension Two Dimensions Blur Variance → Iterations Needed Blur Variance → Iterations Needed σ² = 1 → 2 σ² = 1 → 4 σ² = 4 → 8 σ² = 4 → 16 σ² = 9 → 18 σ² = 9 → 36 σ² = 16 → 32 σ² = 16 → 64 Thus, a unique relationship exists for the one dimensional and two dimensional cases. One Dimension:

-   -   Δσ²=3→Δiterations=6     -   Δσ²=5→Δiterations=10×2     -   Δσ²=7→Δiterations=14         Two Dimensions:     -   Δσ²=3→Δiterations=12     -   Δσ²=5→Δiterations=20×4     -   Δσ²=7→Δiterations=28         The above relationship is true for the “non-linear” variance         quantity σ₂ ²−σ₁ ²=Δσ² where σ₂ ²>σ₁ ². Thus, it is possible to         accurately simulate and compute the change in Gaussian blur         utilizing the method described above.

From FIG. 3, equations are able to be derived to determine the blur difference. FIG. 3 shows a lens 100, with a distance of D2 between the lens 100 and the sensor 102. Since the lens 100 is movable, the distance between the lens 100 and the sensor 102 is variable such that the distances are represented by the distance D2 and the distance D1. The distance from the scene (not shown) and the lens 100 is the distance d₀ which is much larger than the distance between the lens 100 and the focal point designated as the distance d_(i). Depending on the distance of the lens 100 from the sensor 102, the blur radius varies. In FIG. 3, the lens 100 moves a short distance and two radii are determined and designated as the radius r₁ and the radius r₂. The value f is designated the focal length.

$\begin{matrix} \begin{matrix} {r_{1} = \frac{{d_{0}D_{1}} - {d_{0}f_{l}} - {f_{l}D_{1}}}{2d_{0}f_{num}}} \\ {= {> \left( r_{1} \right)^{2}}} \\ {= \left( \frac{{d_{0}D_{1}} - {d_{0}f_{l}} - {f_{l}D_{1}}}{2d_{0}f_{num}} \right)^{2}} \end{matrix} & (10) \\ \begin{matrix} {r_{2} = \frac{{d_{0}D_{2}} - {d_{0}f_{l}} - {f_{l}D_{2}}}{2d_{0}f_{num}}} \\ {= {> \left( r_{2} \right)^{2}}} \\ {= \left( \frac{{d_{0}D_{2}} - {d_{0}f_{l}} - {f_{l}D_{2}}}{2d_{0}f_{num}} \right)^{2}} \end{matrix} & (11) \end{matrix}$ Assuming r1 is larger than r2, the following positive valued quantity is able to be computed:

$\begin{matrix} {{\left( r_{1} \right)^{2} - \left( r_{2} \right)^{2}} = \frac{\begin{matrix} {\left( {{d_{0}D_{1}} - {d_{0}f_{l}} - {f_{l}D_{1}}} \right)^{2} -} \\ \left( {{d_{0}D_{2}} - {d_{0}f_{l}} - {f_{l}D_{2}}} \right)^{2} \end{matrix}}{2d_{0}f_{num}}} & (12) \end{matrix}$ Equation (12) is a non-linear version of the blur difference. Re-arranging equation (12) results in the following equation:

$\begin{matrix} {{{\left\lbrack {{{- \left( {{- \left( r_{1} \right)^{2}} + \left( r_{2} \right)^{2}} \right)}\left( {2f_{num}} \right)^{2}} + \left( {D_{2} - f_{l}} \right)^{2} - \left( {D_{1} - f_{l}} \right)^{2}} \right\rbrack d_{0}^{2}} + {\left\lbrack {2f_{1}\left\{ {{\left( {D_{2} - f_{l}} \right)D_{2}} - {\left( {D_{1} - f_{l}} \right)D_{1}}} \right\}} \right\rbrack d_{0}} - \left\lbrack {\left( {f_{l}D_{1}} \right)^{2} - \left( {f_{l}D_{2}} \right)^{2}} \right\rbrack} = 0} & (13) \end{matrix}$ Then, using the quadratic formula, the depth d₀ is able to be determined: ax ² +bx+c=0 a=[−(−(r ₁)²+(r ₂)²)(2f _(num))²+(D ₂ −f ₁)²−(D ₁ −f ₁)²]  (14) b=[2f ₁{(D ₂ −f ₁)D ₂−(D ₁ −f ₁)D ₁}] c=[(f ₁ D ₁)²−(f ₁ D ₂)²]

FIG. 4 illustrates two images with different blur quantities. A first image 400 has a narrower blur quantity 404 than a second image 402 having a wider blur quantity 406. Using a telescoping gaussian blur, the blur quantity 404 of the first image 400 is related to the blur quantity 406 of the second image 402. In the ideal optical scenario, the two blur quantities or functions are pillbox blur functions.

FIG. 5 illustrates a first image 500 with a blur radius r₁ and a second image 502 with a blur radius r₂ . A number of equations are implemented utilizing the difference in blur of the two images. Based on the first image 500:

$\left. {\overset{\_}{r}}_{1}\leftarrow{{\overset{\_}{r}}_{1} \approx \left. \overset{\_}{2\;\sigma_{1}}\downarrow\overset{\_}{\left( r_{1}^{2} \right)} \right.} \right.$ From the second image 502:

$\begin{matrix} {\;{\left. \overset{\_}{r_{2}}\leftarrow{\overset{\_}{r_{2}} \approx \left. \overset{\_}{2\;\sigma_{2}}\downarrow\overset{\_}{\left( r_{2}^{2} \right)} \right.} \right.{{Then},{{\Delta\overset{\_}{\left( r^{2} \right)}} = {\overset{\_}{\left( r_{2}^{2} \right)} - \overset{\_}{\left( r_{1}^{2} \right)}}}}}} & (15) \\ {{\Delta\;{Iterations}} = {{4\;\Delta\overset{\_}{\left( \sigma^{2} \right)}} = {{{4\left( {\overset{\_}{\left( \sigma_{2}^{2} \right)} - \overset{\_}{\left( \sigma_{1}^{2} \right)}} \right)} \approx {\Delta\overset{\_}{\left( r^{2} \right)}}} = {\overset{\_}{\left( r_{2}^{2} \right)} - \overset{\_}{\left( r_{1}^{2} \right)}}}}} & (16) \end{matrix}$ The overbar denotes quantities in pixel based/pixel reference units.

FIG. 6 illustrates a lens with designated parameters. Equation (17) is derived from FIG. 6 where changing the distance of the lens to the object and to the sensor affect the parameters used to compute the blur difference.

$\begin{matrix} {\begin{matrix} {\;{\overset{\_}{r} = {\frac{{lens}->D}{2}*\frac{{abs}\left( {{lens}->{{{f\_}{just}} - {f\_ defocus}}} \right)}{{lens}->{f\_ just}}*}}} \\ {\frac{{lens}->{pixel\_ num}}{{lens}->{imager\_ size}}} \end{matrix}{{LPN} = {{Lens}->{pixel\_ num}}}{{LIS} = {{Lens}->{imager\_ size}}}} & (17) \\ \begin{matrix} {{\left( \frac{LPN}{LIS} \right)^{- 2}4\;\Delta\overset{\_}{\left( \sigma^{2} \right)}} = {\left( \frac{LPN}{LIS} \right)^{- 2}4\left( {\overset{\_}{\left( \sigma_{2}^{2} \right)} - \overset{\_}{\left( \sigma_{1}^{2} \right)}} \right)}} \\ {\approx {\left( \frac{LPN}{LIS} \right)^{- 2}\Delta\;\overset{\_}{\left( r^{2} \right)}}} \\ {= {\left( \frac{LPN}{LIS} \right)^{- 2}\left( {\overset{\_}{\left( r_{2}^{2} \right)} - \overset{\_}{\left( r_{1}^{2} \right)}} \right)}} \\ {= {\left( r_{2}^{2} \right) - \left( r_{1}^{2} \right)}} \\ {= {\Delta\;\left( r^{2} \right)}} \end{matrix} & (18) \end{matrix}$ Therefore, using equation (18) the blur difference Δ(r²) is able to be determined.

Hence, a first image with a first blur quantity and a second image with a second blur quantity are able to be used to determine a variance delta Δ (σ²) after a number of iterations. From the variance delta, a blur difference Δ(r²) is determined from equation 18. Using the quadratic formula and the blur radius delta, a depth d₀ is able to be determined, as shown below.

$\begin{matrix} \left. {\Delta\;\left( r^{2} \right)}\rightarrow\left. \frac{{- b} \pm \sqrt{b^{2} - {4{ac}}}}{2a}\rightarrow d_{0} \right. \right. & (19) \end{matrix}$

By determining the depth d₀, a device is able to utilize the depth information for applications such as autofocusing.

The pillbox (r) and gaussian (σ) blur kernels have the following approximate relationship with respect to filtered energy: r˜2σ.

Therefore, taking a first image with pillbox blur equal to the value r₁ and convolving it with the approximate telescoping solution of [3×3 kernel] for 1 to n iterations yields a pillbox blur equal to the value r₂.

Through observations, better performance occurs when the difference in blur in the first image to the second image is small. Furthermore, it is helpful for the blur quantities to be small.

FIG. 7 illustrates a graphical representation of an imaging device implementing the method described herein. The imaging device 700 is utilized to capture an image from a scene (not shown) as would any typical imaging device. One or more input signals 704 are acquired from the scene (not shown) and pass through the movable lens 100. The one or more signals 704 are then received at the image sensor 102 which is coupled to a computing module 702 including, but not limited to, a processor and data storage. Within the computing module 702 are one or more programs for performing the methods described herein. The imaging device 700 includes, but is not limited to cameras, video cameras, camcorders, digital cameras, cell phones, and PDAs.

There are a number of devices that are able to utilize the method of receiving multiple blurred images to generate a depth map. Such a device obtains a signal of an image from a scene. The signal passes through a lens and is received by an image sensor. The lens is then moved a short distance and the signal passes through again and is received by the image sensor. With different distances between the lens and the sensor, the signals of the images arrive at the sensors with differing blur quantities. An improved method of simulating gaussian blur and an approximation equation that relates a known gaussian blur quantity to a known pillbox quantity are used in conjunction with a non-linear blur difference equation. The blur quantity difference is able to be calculated and then used to determine the depth map. With the depth information, tasks like image segmentation and object detection are better performed. Many applications are possible with the method and system described herein, including, but not limited to autofocusing, surveillance, robot/computer vision, autonomous vehicle navigation, multi-dimensional imaging and data compression. For a user of the device which implements the method described herein, the functionality is similar to that of other related technologies. For example, a person who is taking a picture with a camera which implements the method to receive multiple blurred images, uses the camera as a generic autofocusing camera. The camera generates a depth map, and then automatically focuses the lens until it establishes the proper focus for the picture, so that the user is able to take a clear picture. However, as described above, the method and system described herein have significant advantages over other autofocusing devices.

In operation, the method and system for receiving multiple blurred images to determine a depth map improve a device's ability to perform a number of functions such as autofocusing. As described above, when a user is utilizing a device which implements the method and system described herein, the device functions as a typical device would from the user's perspective. The improvements of being able to compute a depth map using multiple blurred images received at a sensor by moving a lens a short distance enable more accurate and improved autofocusing. An improved method of simulating gaussian blur assists in determining the depth for autofocusing. Using non-linear blur difference instead of linear provides better accuracy as well. The approximate depth map is generated by implementing a pillbox blur based imaging system using an algorithm based on a gaussian blur approximation.

In other embodiments, the image sensor is moved in addition to or instead of the lens to acquire pictures with different blur quantities.

The present invention has been described in terms of specific embodiments incorporating details to facilitate the understanding of principles of construction and operation of the invention. Such reference herein to specific embodiments and details thereof is not intended to limit the scope of the claims appended hereto. It will be readily apparent to one skilled in the art that other various modifications may be made in the embodiment chosen for illustration without departing from the spirit and scope of the invention as defined by the claims. 

1. An apparatus for determining depth information comprising: a. a lens for acquiring an image signal; b. an image sensor for receiving the image signal, wherein one or more of the lens and the image sensor are movable in relation to each other; and c. a processing module coupled to the image sensor for determining depth information by using a first blur quantity and a second blur quantity to determine a non-linear blur difference.
 2. The apparatus as claimed in claim 1 wherein the lens, the image sensor and the processing module are contained within an imaging device.
 3. The apparatus as claimed in claim 2 wherein the imaging device is selected from the group consisting of a camera, a video camera, a camcorder, a digital camera, a cell phone and a PDA.
 4. The apparatus as claimed in claim 1 wherein the lens is movable and acquires the image signal at a first position and then at a second position.
 5. The apparatus as claimed in claim 1 wherein the processing module simulates gaussian blur.
 6. The apparatus as claimed in claim 5 wherein the processing module simulates gaussian blur using iterations of a convolution kernel.
 7. The apparatus as claimed in claim 1 wherein the processing module relates a gaussian blur quantity to a pillbox blur quantity.
 8. A method of determining depth information comprising: a. receiving a first image signal with a first blur quantity at an image sensor after the first image signal passes through a lens at a first position; b. receiving a second image signal with a second blur quantity at the image sensor after the second image signal passes through the lens at a second position; c. computing a non-linear blur difference using the first blur quantity and the second blur quantity; and d. generating a depth map from the non-linear blur difference.
 9. The method as claimed in claim 8 wherein the method is performed within an imaging device.
 10. The method as claimed in claim 9 wherein the imaging device is selected from the group consisting of a camera, a video camera, a camcorder, a digital camera, a cell phone and a PDA.
 11. The method as claimed in claim 8 further comprising simulating gaussian blur.
 12. The method as claimed in claim 11 wherein simulating gaussian blur uses iterations of a convolution kernel.
 13. The method as claimed in claim 8 further comprising relating a gaussian blur quantity to a pillbox blur quantity.
 14. A method calculating depth information comprising: a. simulating a gaussian blur quantity using a convolution kernel; b. relating the gaussian blur quantity to a pillbox blur quantity; c. computing a non-linear blur difference; and d. generating a depth map from the non-linear blur difference.
 15. The method as claimed in claim 14 wherein the method is performed within an imaging device.
 16. The method as claimed in claim 15 wherein the imaging device is selected from the group consisting of a camera, a video camera, a camcorder, a digital camera, a cell phone and a PDA.
 17. The method as claimed in claim 14 wherein simulating gaussian blur uses iterations of a convolution kernel.
 18. A capture and display device comprising: a. a lens for receiving an image signal; b. an image sensor for receiving the received image signal, wherein one or more of the lens and the image sensor are movable in relation to each other; and c. a program coupled to the image sensor for determining depth information by using a first blur quantity and a second blur quantity to determine a non-linear blur difference.
 19. The capture and display device as claimed in claim 18 wherein the lens, the image sensor and the program are contained within an imaging device.
 20. The capture and display device as claimed in claim 19 wherein the imaging device is selected from the group consisting of a camera, a video camera, a camcorder, a digital camera, a cell phone and a PDA.
 21. The capture and display device as claimed in claim 18 wherein the lens is movable and acquires the image signal at a first position and then at a second position.
 22. The capture and display device as claimed in claim 18 wherein the program simulates gaussian blur.
 23. The capture and display device as claimed in claim 22 wherein the program simulates gaussian blur using iterations of a convolution kernel.
 24. The capture and display device as claimed in claim 18 wherein the program relates a gaussian blur quantity to a pillbox blur quantity.
 25. An apparatus for determining depth information comprising: a. a lens for receiving an image signal; b. an image sensor for receiving the received image signal, wherein one or more of the lens and the image sensor are movable in relation to each other; and c. a processing module coupled to the image sensor for determining depth information by using a first blur quantity and a second blur quantity to determine a non-linear blur difference, wherein a gaussian blur is simulated.
 26. The apparatus as claimed in claim 25 wherein the lens, the image sensor and the processing module are contained within an imaging device.
 27. The apparatus as claimed in claim 26 wherein the imaging device is selected from the group consisting of a camera, a video camera, a camcorder, a digital camera, a cell phone and a PDA.
 28. The apparatus as claimed in claim 25 wherein the image sensor is movable and acquires the image signal at a first position and then at a second position.
 29. The apparatus as claimed in claim 25 wherein the processing module simulates the gaussian blur using iterations of a convolution kernel.
 30. The apparatus as claimed in claim 25 wherein the processing module relates the gaussian blur quantity to a pillbox blur quantity. 